package com.lc.pda.exception;

import com.lc.pda.exception.base.BaseException;

/**
 * 系统管理模块异常抛出
 * @author NASH.LEE
 */
public class ApplicationException extends BaseException {

    private static int SYSTEM_EXCEPTION = 5000;
    private static int DEVICE_EXCEPTION = 6000;
    private static int HRES_EXCEPTION = 7000;

    public ApplicationException(int code, String msg) {
        super(code, msg);
    }

    public static ApplicationException systemException(String msg) {
        return new ApplicationException(SYSTEM_EXCEPTION, msg);
    }

    public static ApplicationException deviceException(String msg) {
        return new ApplicationException(DEVICE_EXCEPTION, msg);
    }

    public static ApplicationException hresException(String msg) {
        return new ApplicationException(HRES_EXCEPTION, msg);
    }
}
